leds: dynamic: Add Dynamic Lighting class interface and Aura (hid-asus) support - #17
Draft
scardracs wants to merge 6 commits into
Draft
leds: dynamic: Add Dynamic Lighting class interface and Aura (hid-asus) support#17scardracs wants to merge 6 commits into
scardracs wants to merge 6 commits into
Conversation
scardracs
force-pushed
the
leds/dynamic-lighting
branch
4 times, most recently
from
September 5, 2026 12:09
005fb1f to
c6ee973
Compare
NeroReflex
reviewed
Sep 5, 2026
scardracs
force-pushed
the
leds/dynamic-lighting
branch
from
September 5, 2026 14:23
c6ee973 to
2ce82cc
Compare
Author
|
I've moved the patch to 7.2 in order to have some stability (7.3 is way too bugged as for now). When the situation will be better I'll move it back to 7.3. I leave that draft open for now |
pastaq
reviewed
Sep 7, 2026
scardracs
force-pushed
the
leds/dynamic-lighting
branch
from
September 8, 2026 07:54
2ce82cc to
45f6a76
Compare
Define LED_DYNAMIC_LIGHTING flag in struct led_classdev to enable runtime type identification for Dynamic Lighting class devices, matching the established pattern used by LED_MULTI_COLOR. Signed-off-by: Marco Scardovi <scardracs@disroot.org>
scardracs
force-pushed
the
leds/dynamic-lighting
branch
from
September 8, 2026 14:19
45f6a76 to
1a38a2e
Compare
scardracs
force-pushed
the
leds/dynamic-lighting
branch
from
September 8, 2026 18:30
1a38a2e to
4e550e9
Compare
Author
|
Added an aura:global that controls both keyboard and lightbar for those devices that don't have the ability to control them separately |
7 tasks
scardracs
force-pushed
the
leds/dynamic-lighting
branch
4 times, most recently
from
September 9, 2026 07:42
3a706b9 to
a4d18f6
Compare
Grippy98
pushed a commit
to Grippy98/linux-unstable
that referenced
this pull request
Sep 10, 2026
cifs.idmap key descriptions carry authority-bearing fields (owner and group SIDs and uid/gid values in "os:"/"gs:"/"oi:"/"gi:" form) that the cifs.idmap upcall helper treats as kernel-originating inputs. Unlike its sibling cifs.spnego, the cifs.idmap key type has no vet_description hook, so userspace can create keys of this type through request_key(2)/add_key(2) and supply those fields without CIFS origin. A request_key(2) call with a non-NULL callout then drives a root usermodehelper upcall (/sbin/request-key -> cifs.idmap) that consumes the unvetted description in root context. Only accept cifs.idmap descriptions while CIFS is using its private root_cred to request the key. id_to_sid()/sid_to_id() already run under override_creds(root_cred), so the kernel-originated path is unaffected. This mirrors commit 3da1fdf ("smb: client: reject userspace cifs.spnego descriptions"), which applied the same restriction to cifs.spnego. Fixes: 4d79dba ("cifs: Add idmap key and related data structures and functions (try OpenGamingCollective#17 repost)") Reported-by: TencentOS Corvus AI <corvus@tencent.com> Cc: stable@vger.kernel.org Assisted-by: CodeBuddy:Kimi-K3 Signed-off-by: Aohan Mei <henrymei@tencent.com> Acked-by: David Howells <dhowells@redhat.com> Signed-off-by: Paulo Alcantara <pc@manguebit.org>
scardracs
force-pushed
the
leds/dynamic-lighting
branch
from
September 10, 2026 06:38
a4d18f6 to
ac42531
Compare
Add a dedicated Dynamic Lighting LED class for devices that expose multi-LED effects, palette programming, direct frame streaming or lighting state persistence through sysfs. The new class extends struct led_classdev with common effect, speed, direction and power-state controls, plus binary write interfaces for packed RGB frames and device-specific frame payloads. Registration validates the exported capabilities, exposes only the attributes implemented by the driver, and serializes writes under led_access and the class-private lock so drivers can coexist safely with LED triggers. This provides a common kernel ABI for complex lighting devices without requiring each driver to invent its own sysfs layout. Signed-off-by: Marco Scardovi <scardracs@disroot.org>
Document the Dynamic Lighting LED class ABI and user-facing sysfs interface. Describe the common attributes, the visibility rules for optional controls, the discoverability attributes used by programmable devices, and the current write semantics for the direct and frame binary interfaces. Also add the new document to the LED documentation index and register it in MAINTAINERS. Signed-off-by: Marco Scardovi <scardracs@disroot.org>
Add Dynamic Lighting class support to hid-asus for Aura-capable ROG keyboards and chassis lightbars. The driver discovers the keyboard layout and lightbar presence through the Aura probe report. When a lightbar is present, it registers: - "aura:global": global aggregate node operating directly on AURA_ZONE_ALL (0) with zone_type="global" - "aura:keyboard": independent keyboard controller operating on AURA_ZONE_KEY1..4 with zone_type="keyboard" or "keyboard_per_key" - "aura:lightbar": independent lightbar controller operating on native hardware zones AURA_ZONE_BAR_LEFT and AURA_ZONE_BAR_RIGHT with zone_type="lightbar" On models without a lightbar, it registers only "aura:keyboard". A runtime sysfs attribute "aura_mode" is exposed on all registered Aura nodes, supporting "auto", "unified", and "split" (rendered as "[auto] unified split"). Under unified mode (the default resolved on lightbar hardware), commands to "aura:global" broadcast to AURA_ZONE_ALL while operations on inactive split nodes return -EBUSY. In split mode, "aura:keyboard" and "aura:lightbar" are driven independently while operations on "aura:global" return -EBUSY. For controllers with direct streaming support, expose packed RGB frame writes through the class direct buffer interface. Drive independent keyboard and chassis lightbar lighting via the hardware effect engine (0xb3) across zones 1..4 for keyboard and native hardware zones 6..7 for lightbar, followed by the firmware latch commit sequence (0xb5 SET -> 0xb4 COMMIT -> 0xb5 SET), ensuring setting static or animated effects on one zone does not touch or interrupt the other. Unmask keyboard and lightbar hardware power states during probe and resume using report 0xbd without invalid zone commands. Drive hardware animation and static effects independently on each zone, committing each update via the firmware latch sequence (0xb5 SET -> 0xb4 COMMIT -> 0xb5 SET). Probe the run-mode capability report before advertising supported effects, fall back to a conservative built-in effect set when the capability query is unavailable, and validate returned report lengths before parsing them. This adds a common sysfs ABI for Aura lighting without regressing the existing asus::kbd_backlight brightness interface. Signed-off-by: Marco Scardovi <scardracs@disroot.org>
Expose Dynamic Lighting class attributes on asus::kbd_backlight when TUF RGB control is supported (kbd_rgb_dev). Register the keyboard backlight via devm_led_classdev_dynamic_register, providing native sysfs controls for standard effects (static, breathing, spectrum cycle, rainbow, strobe), speed, palette colors, and power state persistence via ACPI WMI method calls (0xb3 and 0xb4). Preserve legacy kbd_rgb_mode and kbd_rgb_state sysfs attributes under the device groups for backward compatibility with existing tools. Signed-off-by: Marco Scardovi <scardracs@disroot.org>
…OG NVMe enclosures ASUS ROG external NVMe enclosures (such as the ROG STRIX Arion, USB ID 0b05:1932) are USB mass-storage devices with no HID interface. Their addressable Aura RGB LEDs hang off an onboard ENE microcontroller driven via 16-byte vendor SCSI commands on the same LUN as the storage. Add the leds-asus-aura-scsi driver using a class_interface registered with the SCSI class. Its add callback matches INQUIRY vendor "ROG" and model "ESD-S1C", retains the SCSI device while the LED is registered, and leaves disk ownership and access untouched for the sd driver. Each matching enclosure exposes a uniquely named Dynamic Lighting device: asus-aura-scsi-<H_C_T_L>:rgb:indicator. Hardware animation offloads (Off, Static, Breathing, Strobe, Spectrum Cycle, Rainbow, Direct streaming), speed (0..4), direction (right/left), palette, and direct RGB frame streaming via direct_buffer are fully integrated. Remove the device from scsi_dh_blist because class-interface discovery does not require device-handler attachment. Signed-off-by: Marco Scardovi <scardracs@disroot.org>
scardracs
force-pushed
the
leds/dynamic-lighting
branch
from
September 10, 2026 21:38
ac42531 to
8ef5708
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This pull request introduces the Dynamic Lighting LED class to the kernel and adds driver support in
hid-asusfor ASUS ROG Aura keyboards and chassis lightbars.It provides a standard sysfs ABI for devices that expose multi-zone effects, palette programming, direct RGB frame streaming, and lighting power-state persistence, without requiring individual drivers to invent ad-hoc sysfs layouts.
NOTE: due to heavy work on both here and linux the text on that OP can or cannot be accurate
Commits Overview
leds: Add LED_DYNAMIC_LIGHTING flag to LED coreLED_DYNAMIC_LIGHTINGinstruct led_classdevto enable runtime identification of Dynamic Lighting class devices, following the pattern ofLED_MULTI_COLOR.leds: dynamic: Add Dynamic Lighting core class interfacedrivers/leds/led-class-dynamic.c,include/linux/led-dynamic-lighting.h) extendingled_classdev.led_accessand the class mutex to ensure thread safety alongside LED triggers.docs: leds: Document the Dynamic Lighting class ABIDocumentation/ABI/testing/sysfs-class-leds-dynamicandDocumentation/leds/leds-class-dynamic.rst.Documentation/leds/index.rstand registers the subsystem files inMAINTAINERS.HID: asus: Add Dynamic Lighting support for Aura deviceshid-asus.0xbd), zone activation (0xc0), and hardware effect engine programming (0xb3) with the firmware latch commit sequence (0xb5 SET->0xb4 COMMIT->0xb5 SET).asus::kbd_backlightbrightness control.